package domain


// ********mock adapter 模拟适配器********

// 定义一个结构体
type CustomerRepositoryStub struct {
	customers []Customer
}

// 定义结构体的方法，实现CustomerRepository接口
func (s CustomerRepositoryStub) FindAll() ([]Customer, error) {
	return s.customers, nil
}

// 构造函数，返回结构体
func NewCustomerRepositoryStub() CustomerRepositoryStub {
	customers := []Customer{
		{"1001", "Jame", "NewYork", "110011", "2000-10-21", "1"},
		{"1002", "Joy", "NewYork", "110011", "2000-10-21", "1"},
	}
	return CustomerRepositoryStub{customers}
}
